import Layout from '@/layout/index.vue'
import { RouteRecordRaw } from "vue-router"


const systemRoute: RouteRecordRaw = {
  path: "/",
  name: "system",
  redirect: '/dashboard',
  component: Layout,
  meta: {
    title: '首页'
  },
  children: [
    {
      path: '/dashboard',
      name: 'dashboard',
      component: () => import("@/views/system/dashboard/index.vue"),
      meta: {
        title: '工作台',
        affix: true,
        icon: 'Coffee',
        isNoKeep: true
      }
    },
    {
      path: '/videoManage',
      redirect: '/videoManage/a',
      name: 'videoManage',
      meta: {
        title: '视频管理',
        icon: 'Coffee'
      },
      children: [
        {
          path: 'a',
          name: 'videoManageA',
          component: () => import('@/views/system/video/a/index.vue'),
          meta: {
            title: '视频列表',
            icon: 'Coffee'
          },
        },
        {
          path: 'b',
          name: 'videoMangeB',
          component: () => import('@/views/system/video/b/index.vue'),
          meta: {
            title: '视频审查',
            icon: 'Coffee'
          },
        },
      ],
    },
    {
      path: '/:pathMatch(.*)*',
      name: 'NotFound',
      component: () => import('@/views/system/Error/404.vue'),
      meta: {
        title: '404not found',
        isHide: true,
      },
    },
  ],
}

export default systemRoute
